// UnitTest.groovy
// Mac Radigan
// $Id: UnitTest.groovy 40 2011-10-23 09:01:42Z mac.radigan $

import groovy.util.GroovyTestCase
import junit.framework.TestCase

@Grab(group='org.radigan', module='xom',   version='1.0.0-SNAPSHOT') 
import org.radigan.xom.impl.XomImpl
@Grab(group='org.radigan', module='xom',   version='1.0.0-SNAPSHOT') 
import org.radigan.xom.service.Xom
@Grab(group='org.radigan', module='xom',   version='1.0.0-SNAPSHOT') 
import org.radigan.xom.impl.CompilerImpl
@Grab(group='org.radigan', module='xom',   version='1.0.0-SNAPSHOT') 
import org.radigan.xom.service.Compiler
@Grab(group='org.radigan', module='xom',   version='1.0.0-SNAPSHOT') 
import org.radigan.xom.service.Object

class UnitTest extends GroovyTestCase {
  private Xom xom = null
  void testXom() {
    println "[starting test]"
    //xom.setSchema(new File("src/test/resources/xml/note.xsd"))
    xom.read(new File("src/test/resources/xml/note.xml"))
    println "[printing AST]"
    def ast = xom.getAbstractSyntaxTree()
    println ast
    def compiler = new CompilerImpl()
    def object = compiler.compile(ast)
    println "[printing OM]"
    println object
  }
  void setUp() {
    xom = new XomImpl()
  }
  void tearDown() {
  }
}

// *EOF*
